Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Improve CompareTrials perfomance #9807

Merged
merged 29 commits into from
Aug 23, 2024

Conversation

AmanuelAaron
Copy link
Contributor

@AmanuelAaron AmanuelAaron commented Aug 8, 2024

Ticket

ET-685

Description

Improving performance of run comparison.

Test Plan

Select a large amount of runs (>50) on the Run Table and click compare. Ensure that the time it takes to load is resonalble

Checklist

  • Changes have been manually QA'd
  • New features have been approved by the corresponding PM
  • User-facing API changes have the "User-facing API Change" label
  • Release notes have been added as a separate file under docs/release-notes/
    See Release Note for details.
  • Licenses have been included for new code which was copied and/or modified from any external code

@cla-bot cla-bot bot added the cla-signed label Aug 8, 2024
Copy link

netlify bot commented Aug 8, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit d452d0a
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/66c777072cb0d90008670259

Copy link

codecov bot commented Aug 8, 2024

Codecov Report

Attention: Patch coverage is 68.83117% with 48 lines in your changes missing coverage. Please review.

Project coverage is 54.28%. Comparing base (9da5620) to head (d452d0a).
Report is 45 commits behind head on main.

Files Patch % Lines
master/internal/api_trials.go 68.62% 32 Missing ⚠️
master/internal/trials/api_trial_source_info.go 0.00% 8 Missing ⚠️
master/internal/api_runs.go 75.00% 3 Missing ⚠️
master/internal/trials/utils.go 81.25% 3 Missing ⚠️
master/internal/api_tensorboard.go 75.00% 1 Missing ⚠️
master/internal/db/postgres_experiments.go 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9807      +/-   ##
==========================================
+ Coverage   54.26%   54.28%   +0.01%     
==========================================
  Files        1261     1261              
  Lines      155671   155782     +111     
  Branches     3536     3534       -2     
==========================================
+ Hits        84481    84560      +79     
- Misses      71052    71084      +32     
  Partials      138      138              
Flag Coverage Δ
backend 44.97% <68.83%> (+0.05%) ⬆️
harness 72.61% <ø> (ø)
web 53.69% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
master/internal/api_tensorboard.go 29.56% <75.00%> (+0.37%) ⬆️
master/internal/db/postgres_experiments.go 58.19% <91.66%> (+0.61%) ⬆️
master/internal/api_runs.go 65.73% <75.00%> (+0.01%) ⬆️
master/internal/trials/utils.go 82.14% <81.25%> (+82.14%) ⬆️
master/internal/trials/api_trial_source_info.go 0.00% <0.00%> (ø)
master/internal/api_trials.go 56.25% <68.62%> (+0.59%) ⬆️

... and 5 files with indirect coverage changes

@AmanuelAaron AmanuelAaron changed the title single get trial call chore: Improve CompareTrials perfomance Aug 12, 2024
@AmanuelAaron AmanuelAaron marked this pull request as ready for review August 15, 2024 19:50
@AmanuelAaron AmanuelAaron requested review from a team as code owners August 15, 2024 19:50
Copy link
Contributor

@carolinaecalderon carolinaecalderon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, missing some test coverage

@@ -521,6 +521,24 @@ WHERE t.id = ?`, trialID).Scan(ctx, &experiment); err != nil {
return &experiment, nil
}

// ExperimentsByTrialID looks up an experiment by a given list of trialIDs, returning
// an error if none exists.
func ExperimentsByTrialID(ctx context.Context, trialIDs []int) ([]*model.Experiment, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocker -- missing a test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test added.

master/internal/trials/utils.go Show resolved Hide resolved
})
return err
}, false},
// {"CanGetExperimentArtifacts", func(id int) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this an intended change? if not, please uncomment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry there was an error with this that I forgot to fix. Done now.

Copy link
Member

@mackrorysd mackrorysd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this to the performance tests - the results look good!

Copy link
Contributor

@carolinaecalderon carolinaecalderon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AmanuelAaron AmanuelAaron merged commit 8dd46d5 into main Aug 23, 2024
81 of 95 checks passed
@AmanuelAaron AmanuelAaron deleted the aaron_amanuel/trail-compare-perf-improv branch August 23, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants